﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace MSTutHelloWebAPI.Models
{
    public class Case
    {
        public string caseID { get; set; }
        public string agencyCaseID { get; set; }
        public string feedbackDate { get; set; }
        public string receivedDate { get; set; }
        public string dueDate { get; set; }
        public string closedDate { get; set; }
        public string closureDesc { get; set; }
        public string mCustID { get; set; }
        public string custName { get; set; }
        public string email { get; set; }
        public string phone { get; set; }
        public string NRIC { get; set; }
        public string caseStatus { get; set; }
        public string category { get; set; }
        public string subCategory1 { get; set; }
        public string subCategory2 { get; set; }
        public string feedbackType { get; set; }
        public string channel { get; set; }
        public string caseAddress { get; set; }
        public string customerAddress { get; set; }
        public string postalCode { get; set; }
        //public string customerPostalCode { get; set; }
        public Double? longitude { get; set; }
        public Double? latitude { get; set; }
        public string subject { get; set; }
        public string description { get; set; }
        public string source { get; set; }
        public int timesRouted { get; set; }
        public bool isViewed { get; set; }
        public string caseOwner { get; set; }
        public string jointID { get; set; }
        public string jointDescription { get; set; }
        public string lastUpdateDateTime { get; set; }
        public string lastUpdateAgency { get; set; }
        public string duplicateMasterCaseID { get; set; }
        public int? duplicateID { get; set; }
        public string imagePath { get; set; }

        public static string NewCaseID()
        {
            Guid postFix = Guid.NewGuid();
            DateTime current = DateTime.Now;
            string NewCaseID = current.ToString("yyyyMMddHHmm") + "-" + postFix.ToString();
            return NewCaseID;
        }
    }
}